/**
 * Created by Administrator on 2017/8/31.
 */
recharge = function ($scope, $ducTools, $compile, $get, http, $dataTableSet) {
    'use strict';
//这个是用的DataTable插件
    var rechargeTable = $('#rechargeTable').DataTable({
        //请求ajax：java的地址serverUrl+apiUrl
        sAjaxSource: 'customer/recharge',
        fnServerData: $ducTools.retrieveData,
        //向服务器请求时候，发送额外的数据给服务器
        fnServerParams: function (aoData) {
            aoData.push(
                {"name": "reName", "value": $scope.reName},
                {"name": "rechargeStartTime", "value": $("#rechargeStartTime").val()},
                {"name": "rechargeEndTime", "value": $("#rechargeEndTime").val()},
                {"name": "reAddress", "value": $scope.reAddress}
            )
        },
        //请求的数据，并生成列
        columns: [
            {"data": "reName"},
            {"data": "rePhone"},
            {"data": "reMoney"},
            {"data": "reTime"},
            {"data": "reAddress"},
        ],
        createdRow: function (row, data, dataIndex) {
            $compile(row)($scope);
        }
    });

    $dataTableSet.dataTableRowShow('rechargeTable');
    //当点击查询的时候，重新绘制表格,请求数据
    $scope.rechargeListDraw = function () {
        rechargeTable.draw();
    }
}
/**
 * Created by Administrator on 2017/8/31.
 */
